<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The Stomp class</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.stomp-version.html">stomp_version</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="stomp.abort.html">Stomp::abort</a></div>
 <div class="up"><a href="book.stomp.html">Stomp</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="class.stomp" class="reference">

 <h1 class="title">The Stomp class</h1>
 

 <div class="partintro"><p class="verinfo">(PECL stomp &gt;= 0.1.0)</p>


  <div class="section" id="stomp.intro">
   <h2 class="title">简介</h2>
   <p class="para">
Represents a connection between PHP and a Stomp compliant Message Broker.
   </p>
  </div>


  <div class="section" id="stomp.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass"></div>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <strong class="classname">Stomp</strong>
     </span>
     {</div>

    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="stomp.abort.html" class="methodname">abort</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$transaction_id</code></span>
   [, <span class="methodparam"><span class="type">array</span> <code class="parameter">$headers</code></span>
   ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="stomp.ack.html" class="methodname">ack</a></span>
    ( <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$msg</code></span>
   [, <span class="methodparam"><span class="type">array</span> <code class="parameter">$headers</code></span>
   ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="stomp.begin.html" class="methodname">begin</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$transaction_id</code></span>
   [, <span class="methodparam"><span class="type">array</span> <code class="parameter">$headers</code></span>
   ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="stomp.commit.html" class="methodname">commit</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$transaction_id</code></span>
   [, <span class="methodparam"><span class="type">array</span> <code class="parameter">$headers</code></span>
   ] )</div>
<div class="methodsynopsis dc-description">
    <span class="modifier">public</span> <span class="methodname"><a href="stomp.construct.html" class="methodname">__construct</a></span>
     ([ <span class="methodparam"><span class="type">string</span> <code class="parameter">$broker</code><span class="initializer"> = ini_get(&quot;stomp.default_broker_uri&quot;)</span></span>
    [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$username</code></span>
    [, <span class="methodparam"><span class="type">string</span> <code class="parameter">$password</code></span>
    [, <span class="methodparam"><span class="type">array</span> <code class="parameter">$headers</code></span>
   ]]]] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="stomp.destruct.html" class="methodname">__destruct</a></span>
    ( <span class="methodparam">void</span>
    )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="stomp.error.html" class="methodname">error</a></span>
    ( <span class="methodparam">void</span>
    )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">array</span><span class="methodname"><a href="stomp.getreadtimeout.html" class="methodname">getReadTimeout</a></span>
    ( <span class="methodparam">void</span>
    )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="stomp.getsessionid.html" class="methodname">getSessionId</a></span>
    ( <span class="methodparam">void</span>
    )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="stomp.hasframe.html" class="methodname">hasFrame</a></span>
    ( <span class="methodparam">void</span>
    )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">stompframe</span><span class="methodname"><a href="stomp.readframe.html" class="methodname">readFrame</a></span>
    ([ <span class="methodparam"><span class="type">string</span> <code class="parameter">$class_name</code><span class="initializer"> = &quot;stompFrame&quot;</span></span>
   ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="stomp.send.html" class="methodname">send</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$destination</code></span>
   , <span class="methodparam"><span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <code class="parameter">$msg</code></span>
   [, <span class="methodparam"><span class="type">array</span> <code class="parameter">$headers</code></span>
   ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="stomp.setreadtimeout.html" class="methodname">setReadTimeout</a></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$seconds</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$microseconds</code></span>
   ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="stomp.subscribe.html" class="methodname">subscribe</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$destination</code></span>
   [, <span class="methodparam"><span class="type">array</span> <code class="parameter">$headers</code></span>
   ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="stomp.unsubscribe.html" class="methodname">unsubscribe</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$destination</code></span>
   [, <span class="methodparam"><span class="type">array</span> <code class="parameter">$headers</code></span>
   ] )</div>

   }</div>


  </div>

 </div>

 










































































































<h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="stomp.abort.html">Stomp::abort</a> — Rolls back a transaction in progress</li><li><a href="stomp.ack.html">Stomp::ack</a> — Acknowledges consumption of a message</li><li><a href="stomp.begin.html">Stomp::begin</a> — Starts a transaction</li><li><a href="stomp.commit.html">Stomp::commit</a> — Commits a transaction in progress</li><li><a href="stomp.construct.html">Stomp::__construct</a> — Opens a connection</li><li><a href="stomp.destruct.html">Stomp::__destruct</a> — Closes stomp connection</li><li><a href="stomp.error.html">Stomp::error</a> — Gets the last stomp error</li><li><a href="stomp.getreadtimeout.html">Stomp::getReadTimeout</a> — Gets read timeout</li><li><a href="stomp.getsessionid.html">Stomp::getSessionId</a> — Gets the current stomp session ID</li><li><a href="stomp.hasframe.html">Stomp::hasFrame</a> — Indicates whether or not there is a frame ready to read</li><li><a href="stomp.readframe.html">Stomp::readFrame</a> — Reads the next frame</li><li><a href="stomp.send.html">Stomp::send</a> — Sends a message</li><li><a href="stomp.setreadtimeout.html">Stomp::setReadTimeout</a> — Sets read timeout</li><li><a href="stomp.subscribe.html">Stomp::subscribe</a> — Registers to listen to a given destination</li><li><a href="stomp.unsubscribe.html">Stomp::unsubscribe</a> — Removes an existing subscription</li></ul>
</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.stomp-version.html">stomp_version</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="stomp.abort.html">Stomp::abort</a></div>
 <div class="up"><a href="book.stomp.html">Stomp</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
